Imports System.IO
Module Routines
    Public Sub update_colors()
        Wizard.PictureBox1.BackColor = ColorTranslator.FromHtml(Wizard.primarybg.Text)
        Wizard.PictureBox2.BackColor = ColorTranslator.FromHtml(Wizard.category.Text)
        Wizard.PictureBox3.BackColor = ColorTranslator.FromHtml(Wizard.title.Text)
        Wizard.PictureBox4.BackColor = ColorTranslator.FromHtml(Wizard.win1.Text)
        Wizard.PictureBox5.BackColor = ColorTranslator.FromHtml(Wizard.win2.Text)
        Wizard.PictureBox6.BackColor = ColorTranslator.FromHtml(Wizard.win3.Text)
        Wizard.PictureBox7.BackColor = ColorTranslator.FromHtml(Wizard.primarytext.Text)
        Wizard.PictureBox8.BackColor = ColorTranslator.FromHtml(Wizard.links.Text)
        Wizard.PictureBox9.BackColor = ColorTranslator.FromHtml(Wizard.linkhover.Text)
        Wizard.PictureBox10.BackColor = ColorTranslator.FromHtml(Wizard.titletext.Text)
        Wizard.PictureBox11.BackColor = ColorTranslator.FromHtml(Wizard.bots.Text)
    End Sub
    Public Sub check_mdichild()
        If MDIParent1.ActiveMdiChild Is Nothing Then
            MDIParent1.CloseToolStripMenuItem.Enabled = False
        Else
            MDIParent1.CloseToolStripMenuItem.Enabled = True
        End If
    End Sub
    'Public Sub close_all()
    'Dim mdichildren As Integer
    '   mdichildren = MDIParent1.MdiChildren.FindLastIndex true
    'End Sub
    Public Sub check_frame()
        If clsGlobal.fram < 0 Or clsGlobal.fram = 0 Then
            Wizard.Text = "Wizard - Introduction"
            clsGlobal.fram = 0
            Wizard.Frame1.Visible = True
            Wizard.Frame2.Visible = False
            Wizard.Frame3.Visible = False
            Wizard.Frame4.Visible = False
            Wizard.back.Enabled = False
            Wizard.Button1.Enabled = False
        End If
        If clsGlobal.fram = 1 Then
            Wizard.Text = "Wizard - Theme Settings - Step 1 of 3"
            Wizard.Frame1.Visible = False
            Wizard.Frame2.Visible = True
            Wizard.Frame3.Visible = False
            Wizard.back.Enabled = True
            Wizard.Button1.Enabled = False
        End If
        If clsGlobal.fram = 2 Then
            Wizard.Text = "Wizard - Background Colors - Step 2 of 3"
            Wizard.Frame2.Visible = False
            Wizard.Frame3.Visible = True
            Wizard.Frame4.Visible = False
            Wizard.back.Enabled = True
            Wizard.nextt.Enabled = True
            Wizard.finish.Enabled = False
            Wizard.Button1.Enabled = True
        End If
        If clsGlobal.fram = 3 Then
            Wizard.Text = "Wizard - Text Colors - Step 3 of 3"
            Wizard.Frame3.Visible = False
            Wizard.Frame4.Visible = True
            Wizard.nextt.Enabled = False
            Wizard.finish.Enabled = True
            Wizard.Button1.Enabled = True
        End If
    End Sub
    Public Sub gen_dat()
        Dim fs As New FileStream("theme.dat", FileMode.Create, FileAccess.Write)
        'declaring a FileStream and creating a word document file named file with
        'access mode of writing
        Dim s As New StreamWriter(fs)
        'creating a new StreamWriter and passing the filestream object fs as argument
        s.BaseStream.Seek(0, SeekOrigin.End)
        'the seek method is used to move the cursor to next position to avoid text to be
        'overwritten
        s.WriteLine("name = '" & Wizard.themename.Text & "'")
        s.WriteLine("desc = '" & Wizard.description.Text & "'")
        s.WriteLine("author = 'Eblah Template Editor'")
        s.WriteLine("website = '" & Wizard.website.Text & "'")
        s.WriteLine("copyright = '" & Wizard.copyright.Text & "'")
        s.WriteLine("preview = '0'")
        'writing text to the newly created file
        s.Close()
        'closing the file
    End Sub
    Public Sub gen_html()
        Dim fs As New FileStream("template.html", FileMode.Create, FileAccess.Write)
        'declaring a FileStream and creating a word document file named file with
        'access mode of writing
        Dim s As New StreamWriter(fs)
        'creating a new StreamWriter and passing the filestream object fs as argument
        s.BaseStream.Seek(0, SeekOrigin.End)
        'the seek method is used to move the cursor to next position to avoid text to be
        'overwritten
        s.WriteLine("<!DOCTYPE html PUBLIC " & Chr(34) & "-//W3C//DTD XHTML 1.1//EN" & Chr(34))
        s.WriteLine(Chr(34) & "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd " & Chr(34) & ">")
        s.WriteLine("<html xmlns=" & Chr(34) & "http://www.w3.org/1999/xhtml" & Chr(34) & " xml:lang=" & Chr(34) & "en" & Chr(34) & ">")
        s.WriteLine("<head>")
        If Wizard.logopath.Text > "" Then
            s.WriteLine("<img src=" & Chr(34) & Wizard.logopath.Text & Chr(34) & " alt=" & Chr(34) & "logo" & Chr(34) & ">")
        Else
        End If
        s.WriteLine("<title><blah v=" & Chr(34) & "$title" & Chr(34) & "> - <blah v=" & Chr(34) & "$mbname" & Chr(34) & "></title>")
        s.WriteLine(" ")
        s.WriteLine("<meta http-equiv=" & Chr(34) & "Content-Type" & Chr(34) & " content=" & Chr(34) & "text/html; charset=UTF-8" & Chr(34) & " />")
        s.WriteLine(" ")
        s.WriteLine("<link rel=" & Chr(34) & "stylesheet" & Chr(34) & " type=" & Chr(34) & "text/css" & Chr(34) & " href=" & Chr(34) & "<blah v=" & Chr(34) & "$templatesu" & Chr(34) & ">/<blah v=" & Chr(34) & "$dtheme" & Chr(34) & ">/template.css" & Chr(34) & " />")
        s.WriteLine(" ")
        s.WriteLine("<!--[if lt IE 7]>")
        s.WriteLine("<script defer type=" & Chr(34) & "text/javascript" & Chr(34) & " src=" & Chr(34) & "/blahdocs/pngfix.js" & Chr(34) & "></script>")
        s.WriteLine("<![endif]-->")
        s.WriteLine(" ")
        s.WriteLine("</head>")
        s.WriteLine("<body class=" & Chr(34) & "mainbg" & Chr(34) & ">")
        s.WriteLine("<div>")
        s.WriteLine("<table cellpadding=" & Chr(34) & "3" & Chr(34) & " width=" & Chr(34) & "100%" & Chr(34) & ">")
        s.WriteLine("  <tr>")
        s.WriteLine("   <td>")
        s.WriteLine("    <table class=" & Chr(34) & "border" & Chr(34) & " width=" & Chr(34) & "100%" & Chr(34) & " cellspacing=" & Chr(34) & "0" & Chr(34) & ">")
        s.WriteLine("     <tr>")
        s.WriteLine("      <td>")
        s.WriteLine("       <div class=" & Chr(34) & "titlebg" & Chr(34) & ">")
        s.WriteLine("        <table width=" & Chr(34) & "100%" & Chr(34) & " cellpadding=" & Chr(34) & "3" & Chr(34) & ">")
        s.WriteLine("         <tr>")
        s.WriteLine("          <td><b><span style=" & Chr(34) & "font-size: 18px;" & Chr(34) & "><blah v=" & Chr(34) & "$title" & Chr(34) & "></span></b></td>")
        s.WriteLine("          <td class=" & Chr(34) & "right" & Chr(34) & "><blah v=" & Chr(34) & "$date_time" & Chr(34) & "></td>")
        s.WriteLine("         </tr>")
        s.WriteLine("        </table>")
        s.WriteLine("       </div>")
        s.WriteLine("       <div class=" & Chr(34) & "win2 center" & Chr(34) & " style=" & Chr(34) & "padding: 5px;" & Chr(34) & "><blah v=" & Chr(34) & "$menubar" & Chr(34) & "></div>")
        s.WriteLine("       <div class=" & Chr(34) & "win center" & Chr(34) & ">")
        s.WriteLine("        <table width=" & Chr(34) & "100%" & Chr(34) & " cellpadding=" & Chr(34) & "4" & Chr(34) & ">")
        s.WriteLine("         <tr>")
        s.WriteLine("         <td><blah v=" & Chr(34) & "$userwelcome" & Chr(34) & "></td>")
        s.WriteLine("          <td class=" & Chr(34) & "right" & Chr(34) & "><blah v=" & Chr(34) & "$userpm" & Chr(34) & "></td>")
        s.WriteLine("         </tr>")
        s.WriteLine("        </table>")
        s.WriteLine("       </div>")
        s.WriteLine("      </td>")
        s.WriteLine("     </tr>")
        s.WriteLine("    </table>")
        s.WriteLine("   </td>")
        s.WriteLine("  </tr><tr>")
        s.WriteLine("   <td><br /><blah main></td>")
        s.WriteLine("  </tr>")
        s.WriteLine(" </table>")
        s.WriteLine(" <br />")
        s.WriteLine(" ")
        s.WriteLine(" <p class=" & Chr(34) & "smalltext" & Chr(34) & "><blah v=" & Chr(34) & "$copyright" & Chr(34) & "></p>")
        s.WriteLine(" <p>")
        s.WriteLine("  <a href=" & Chr(34) & "http://validator.w3.org/check/referer" & Chr(34) & " onclick=" & Chr(34) & "target='_blank';" & Chr(34) & "><img src=" & Chr(34) & "/blahdocs/images/xhtml.png" & Chr(34) & " alt=" & Chr(34) & "Valid XHTML" & Chr(34) & " title=" & Chr(34) & "Valid XHTML" & Chr(34) & " /></a>")
        s.WriteLine("  <a href=" & Chr(34) & "http://jigsaw.w3.org/css-validator/" & Chr(34) & " onclick=" & Chr(34) & "target='_blank';" & Chr(34) & "><img src=" & Chr(34) & "/blahdocs/images/css.png" & Chr(34) & " alt=" & Chr(34) & "Valid CSS" & Chr(34) & " title=" & Chr(34) & "Valid CSS" & Chr(34) & " /></a>")
        s.WriteLine("  <a href=" & Chr(34) & "http://sourceforge.net/projects/eblah" & Chr(34) & " onclick=" & Chr(34) & "target='_blank';" & Chr(34) & "><img src=" & Chr(34) & "/blahdocs/images/sf.png" & Chr(34) & " alt=" & Chr(34) & "Sourceforge.net" & Chr(34) & " title=" & Chr(34) & "Valid CSS" & Chr(34) & " /></a>")
        s.WriteLine("  <a href=" & Chr(34) & "http://www.perl.com/" & Chr(34) & " onclick=" & Chr(34) & "target='_blank';" & Chr(34) & "><img src=" & Chr(34) & "/blahdocs/images/perl.png" & Chr(34) & " alt=" & Chr(34) & "Powered by Perl" & Chr(34) & " title=" & Chr(34) & "Powered by Perl" & Chr(34) & " /></a>")
        s.WriteLine(" </p>")
        s.WriteLine(" <br />")
        s.WriteLine(Wizard.footer.Text)
        s.WriteLine("</div>")
        s.WriteLine("</body>")
        s.WriteLine("</html>")
        'writing text to the newly created file
        s.Close()
        'closing the file
    End Sub
    Public Sub gen_css()
        Dim fs As New FileStream("template.css", FileMode.Create, FileAccess.Write)
        'declaring a FileStream and creating a word document file named file with
        'access mode of writing
        Dim s As New StreamWriter(fs)
        'creating a new StreamWriter and passing the filestream object fs as argument
        s.BaseStream.Seek(0, SeekOrigin.End)
        'the seek method is used to move the cursor to next position to avoid text to be
        'overwritten
        'generate css template based on wizard
        s.WriteLine("/* Global Table Settings */")
        s.WriteLine("body, table, td {")
        s.WriteLine("         font-family: Verdana, Helvetica, Arial;")
        s.WriteLine("         font-size  : 11px;")
        s.WriteLine("         line-height: 1.3;")
        s.WriteLine("         color      : " & Wizard.primarytext.Text & ";")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("body {")
        s.WriteLine("         background-color: " & Wizard.primarybg.Text & ";")
        s.WriteLine("         position        : absolute;")
        s.WriteLine("    margin          : 5px;")
        s.WriteLine("    text-align      : center;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("table {")
        s.WriteLine("    margin-left : auto;")
        s.WriteLine("    margin-right: auto;")
        s.WriteLine("}")
        s.WriteLine("/*")
        s.WriteLine("   Centering help:")
        s.WriteLine("   http://www.maxdesign.com.au/presentation/center/")
        s.WriteLine("*/")
        s.WriteLine(" ")
        s.WriteLine("td {")
        s.WriteLine("    text-align: left;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("img {")
        s.WriteLine("    border: 0px;")
        s.WriteLine("}")
        s.WriteLine(".catdesc {")
        s.WriteLine("    padding    : 4px;")
        s.WriteLine("    line-height: 130%;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".normaltext {")
        s.WriteLine("    font-size: 11px;")
        s.WriteLine("    text-decoration: none;")
        s.WriteLine("    font-weight: normal;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".indextitle {")
        s.WriteLine("    font-size  : 20px;")
        s.WriteLine("   font-weight: bold;")
        s.WriteLine("    white-space: nowrap;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".pages {")
        s.WriteLine("    font-weight   : normal !important;")
        s.WriteLine("    font-size     : 9px;")
        s.WriteLine("    line-height   : 1.5;")
        s.WriteLine("    white-space   : nowrap;")
        s.WriteLine("    padding-top   : 4px;")
        s.WriteLine("    padding-bottom: 4px;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".pages a, .pages a:link, .pages a:active, .pages a:visited {")
        s.WriteLine("    padding: 4px;")
        s.WriteLine("    border: 1px solid #969696;")
        s.WriteLine("    background-color: #F2F2F2;")
        s.WriteLine("    text-decoration: none !important;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".pages a:hover {")
        s.WriteLine("    padding: 4px;")
        s.WriteLine("    border: 1px solid #969696;")
        s.WriteLine("    background-color: #E5E5E5;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".pages strong {")
        s.WriteLine("    padding: 4px;")
        s.WriteLine("    border: 1px solid #969696;")
        s.WriteLine("    background-color: #EDEDED;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".postmenu {")
        s.WriteLine("    font-weight: normal !important;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".indexmenu {")
        s.WriteLine("    font-weight: bold !important;")
        s.WriteLine("    white-space: nowrap;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".menubar a, .menubar a:link, .menubar a:active, .menubar a:visited {")
        s.WriteLine("    text-decoration: none;")
        s.WriteLine("    padding: 6px;")
        s.WriteLine("    white-space: nowrap;")
        s.WriteLine("    line-height: 2.5;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".menubar a:hover {")
        s.WriteLine("    padding: 5px;")
        s.WriteLine("    border: 1px solid #000;")
        s.WriteLine("    background-color: #C0C0C0;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".catdesc {")
        s.WriteLine("    padding    : 4px;")
        s.WriteLine("    line-height: 130%;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".menubar a, .menubar a:link, .menubar a:active, .menubar a:visited {")
        s.WriteLine("    text-decoration: none;")
        s.WriteLine("    padding: 6px;")
        s.WriteLine("    white-space: nowrap;")
        s.WriteLine("    line-height: 2.5;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".menubar a:hover {")
        s.WriteLine("    padding: 5px;")
        s.WriteLine("    border: 1px solid #000;")
        s.WriteLine("    background-color: #C0C0C0;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("#membercenter a, #membercenter a:link, #membercenter a:active, #membercenter a:visited {")
        s.WriteLine("    line-height : 2;")
        s.WriteLine("    padding-left: 5px;")
        s.WriteLine("    width       : 100%;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("#membercenter a:hover {")
        s.WriteLine("    padding-left: 2px;")
        s.WriteLine("    border-left : 3px solid #000000;")
        s.WriteLine("    text-decoration: none;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("#postbar img {")
        s.WriteLine("    margin: 1px;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("#postbar a:hover img {")
        s.WriteLine("    margin: 0px;")
        s.WriteLine("    border: 1px solid #000;")
        s.WriteLine("    background: #90A9C5;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("/* Mini-profile:")
        s.WriteLine("    Fancy --> title and value")
        s.WriteLine("    Plain --> On one line")
        s.WriteLine("    Avatar --> Just the avatar and stats (stars)")
        s.WriteLine("*/")
        s.WriteLine(".fancyprofilet, .fancyprofilev, .plainprofile {")
        s.WriteLine("    padding: 5px;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".avatarprofile {")
        s.WriteLine("    margin: 10px;")
        s.WriteLine("    line-height: 2.3;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".milastaction {")
        s.WriteLine("    margin-bottom: 3px;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".bilastaction {")
        s.WriteLine("    line-height: 1.8;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("/* Date Color */")
        s.WriteLine(".bidate, .midate, .didate {")
        s.WriteLine("    color: #727272;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".loading {")
        s.WriteLine("    background-image : url(/blahdocs/images/loading.gif);")
        s.WriteLine("    background-repeat: no-repeat;")
        s.WriteLine("    width            : 222px;")
        s.WriteLine("    height           : 19px;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".right {")
        s.WriteLine("    text-align: right !important;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".center {")
        s.WriteLine("    text-align: center !important;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".justify {")
        s.WriteLine("    text-align: justify !important;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".vtop {")
        s.WriteLine("    vertical-align: top !important;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".innertable {")
        s.WriteLine("    margin: 0px !important;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".leftimg {")
        s.WriteLine("    float        : left;")
        s.WriteLine("    padding-right: 5px;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".rightimg {")
        s.WriteLine("    float       : right;")
        s.WriteLine("    padding-left: 5px;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".centerimg {")
        s.WriteLine("    vertical-align: middle;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".boardsearch {")
        s.WriteLine("    background    : url(/blahdocs/images/search.png) 3px 4px no-repeat;")
        s.WriteLine("    padding-left  : 19px;")
        s.WriteLine("    padding-top   : 5px;")
        s.WriteLine("    padding-bottom: 5px;")
        s.WriteLine("    width         : 90%;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("/* If user has a color, specify the options for that user name to appear here */")
        s.WriteLine(".usercolors {")
        s.WriteLine("    font-weight: bold;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("/* Colors */")
        s.WriteLine(".titlebg, .catbg {")
        s.WriteLine("    font-family: Verdana, Helvetica, Arial;")
        s.WriteLine("    font-size  : 12px;")
        s.WriteLine("    color      : " & Wizard.titletext.Text & ";")
        s.WriteLine("    font-weight: bold;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".titlebg {")
        s.WriteLine("    background: url(images/titlebg.gif);")
        s.WriteLine("    background-color: " & Wizard.title.Text & ";")
        s.WriteLine("    border: 1px solid #FFF;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".catbg {")
        s.WriteLine("    background: url(images/catbg.gif);")
        s.WriteLine("    background-color: " & Wizard.category.Text & ";")
        s.WriteLine("    border: 1px solid #FFF;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".win {")
        s.WriteLine("    background-color: " & Wizard.win1.Text & ";")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".win2 {")
        s.WriteLine("    background-color: " & Wizard.win2.Text & ";")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".win3 {")
        s.WriteLine("    background-color: " & Wizard.win3.Text & ";")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".win4 {")
        s.WriteLine("    background-color: #D1D1D1;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".win5 {")
        s.WriteLine("    background-color: #DBDBDB;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".border, hr {")
        s.WriteLine("    background-color: #969696;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("hr {")
        s.WriteLine("    height: 1px;")
        s.WriteLine("    border: 0;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("/* Board Index Description */")
        s.WriteLine(".bidesc {")
        s.WriteLine("    font-weight: normal;")
        s.WriteLine("    font-size  : 10px;")
        s.WriteLine("    line-height: 1.5;")
        s.WriteLine("    color      : #444 !important;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("/* Small font text size */")
        s.WriteLine(".smalltext {")
        s.WriteLine("    font-weight: normal;")
        s.WriteLine("    font-size  : 9px;")
        s.WriteLine("    line-height: 1.5;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("/* Table alignment */")
        s.WriteLine("div.centered {")
        s.WriteLine("    text-align: center;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("div.centered table {")
        s.WriteLine("    margin-left : auto;")
        s.WriteLine("    margin-right: auto; /* long form to make IE5/Mac happy */")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".messageseps {")
        s.WriteLine("    border-top: 1px dashed #000;")
        s.WriteLine("    padding   : 5px;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("/* Reputation */")
        s.WriteLine(".redrep { /* Bad */")
        s.WriteLine("    color: #FF0033;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".grayrep  { /* Neutral */")
        s.WriteLine("    color: #CCC;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".greenrep { /* Good */")
        s.WriteLine("    color: #00AF33;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".greenrep, .grayrep, .redrep {")
        s.WriteLine("    font-weight: bold;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("/* Bots: this is shown in the  " & Chr(34) & "Online" & Chr(34) & " places */")
        s.WriteLine(".onlinebots {")
        s.WriteLine("    color      : " & Wizard.bots.Text & ";")
        s.WriteLine("    font-style : italic;")
        s.WriteLine("    font-weight: normal;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".postbody { /* Format the post body */")
        s.WriteLine("    font-size  : 12px;")
        s.WriteLine("    line-height: 1.5;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("/* Poll Colors */")
        s.WriteLine(".pollcolor {")
        s.WriteLine("    background-color: #AAADB4;")
        s.WriteLine("    padding-left    : 5px;")
        s.WriteLine("    border-right: 5px solid #000;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(" ")
        s.WriteLine(".pollpercents {")
        s.WriteLine("    background-color: #D2D5DA;")
        s.WriteLine("    color           : #000;")
        s.WriteLine("    padding-right   : 10px;")
        s.WriteLine("    padding-left    : 10px;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(" ")
        s.WriteLine(".pollborder {")
        s.WriteLine("    background-color: #000;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("/* Links */")
        s.WriteLine(" ")
        s.WriteLine("a, a:link, a:active, a:visited {")
        s.WriteLine("    text-decoration: none;")
        s.WriteLine("    color          : " & Wizard.links.Text & ";")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("a:hover {")
        s.WriteLine("    text-decoration: underline;")
        s.WriteLine("    color          : " & Wizard.linkhover.Text & ";")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("/* Forms */")
        s.WriteLine(".upload, input, textarea, select { /* .checkboxinput also allowed */")
        s.WriteLine(" ")
        s.WriteLine("    color           : #000;")
        s.WriteLine(" ")
        s.WriteLine("    background-color: #EEE;")
        s.WriteLine(" ")
        s.WriteLine("    font-family     : Verdana, Helvetica, Times;")
        s.WriteLine(" ")
        s.WriteLine("    font-size       : 10px;")
        s.WriteLine(" ")
        s.WriteLine("    border          : 1px #8A8D96 solid;")
        s.WriteLine(" ")
        s.WriteLine(" ")
        s.WriteLine(" ")
        s.WriteLine("    border-top-width   : 1px;")
        s.WriteLine(" ")
        s.WriteLine("    border-right-width : 1px;")
        s.WriteLine(" ")
        s.WriteLine("    border-bottom-width: 1px;")
        s.WriteLine(" ")
        s.WriteLine("    border-left-width  : 1px;")
        s.WriteLine(" ")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("textarea {")
        s.WriteLine("    padding    : 3px;")
        s.WriteLine("    line-height: 130%;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("input { text-indent : 2px; margin: 0px; padding: 5px; }")
        s.WriteLine(" ")
        s.WriteLine("input.button {")
        s.WriteLine("    border : 1px solid #000;")
        s.WriteLine("    padding: 5px;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("form, input {")
        s.WriteLine("    margin-top: 0px;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("form {")
        s.WriteLine("    margin-bottom: 0px;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("/* Portal Styles */")
        s.WriteLine(".dbx-clone {")
        s.WriteLine("    position  :absolute;")
        s.WriteLine("    visibility:hidden;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".dbx-clone, .dbx-clone .dbx-handle-cursor {")
        s.WriteLine("    cursor: move !important;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".dbx-dummy {")
        s.WriteLine("    display : block;")
        s.WriteLine("    width   : 0;")
        s.WriteLine("    height  : 0;")
        s.WriteLine("    overflow: hidden;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".dbx-group, .dbx-box, .dbx-handle {")
        s.WriteLine("    position: relative;")
        s.WriteLine("    display : block;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("#dbx-box {")
        s.WriteLine("    margin : 0px;")
        s.WriteLine("    padding: 0px;")
        s.WriteLine("    border : none;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine("/* Calendar */")
        s.WriteLine(".calendarevent { /* Title on the Day view */")
        s.WriteLine("    font-size  : 18px;")
        s.WriteLine("    font-weight: bold;")
        s.WriteLine("}")
        s.WriteLine(" ")
        s.WriteLine(".currentday { /* These will make the entire day/week kind of faded */")
        s.WriteLine("    opacity: .85;")
        s.WriteLine("    filter : alpha(opacity=85);")
        s.WriteLine("}")
        'writing text to the newly created file
        s.Close()
        'closing the file
    End Sub
    Public Sub load_data()
        Dim document As New Doc
        ' Make it a child of this MDI form before showing it.
        document.MdiParent = MDIParent1
        document.RichTextBox1.LoadFile("theme.dat", _
        RichTextBoxStreamType.PlainText)
        document.Visible = True
        document.Text = CurDir() & "theme.dat"
    End Sub
    Public Sub load_html()
        Dim document As New Doc
        ' Make it a child of this MDI form before showing it.
        document.MdiParent = MDIParent1
        document.RichTextBox1.LoadFile("template.html", _
        RichTextBoxStreamType.PlainText)
        document.Visible = True
        document.Text = CurDir() & "template.html"
    End Sub
    Public Sub load_css()
        Dim OpenFileDialog As New OpenFileDialog
        Dim document As New Doc
        ' Make it a child of this MDI form before showing it.
        document.MdiParent = MDIParent1
        document.RichTextBox1.LoadFile("template.css", _
        RichTextBoxStreamType.PlainText)
        document.Visible = True
        document.Text = CurDir() & "template.css"
    End Sub
    Public Sub check_wiz()
        If Wizard.website.Text = "" Then
            MsgBox("Please enter a value for your website.")
        End If
        If Wizard.description.Text = "" Then
            MsgBox("Please enter a description of your theme.")
        End If
        If Wizard.themename.Text = "" Then
            MsgBox("Please give your theme a name.")
        End If

    End Sub
    Function FileExist(ByVal sTestFile As String) As Boolean
        'This function does not use DIR since it is possible that you might have
        'been in the middle of running DIR against another directory in
        'an attempt to match one directory against another.

        'It does not handle wildcard characters
        Dim lSize As Long
        On Error Resume Next
        'Preset length to -1 because files can be zero bytes in length
        lSize = -1
        'Get the length of the file
        lSize = FileLen(sTestFile)
        If lSize > -1 Then
            FileExist = True
        Else
            FileExist = False
        End If
    End Function
    Function DeleteFile(ByVal FileToDelete As String) As Boolean
        If System.IO.File.Exists(FileToDelete) = True Then
            System.IO.File.Delete(FileToDelete)
            'MsgBox(FileToDelete & " deleted.")
        End If
    End Function
End Module
